package _01封装回顾;
/**
    目标：面向对象之封装回顾

    需求：
        定义中国人类Chinese，要求有姓名name ,年龄age, 国籍country三个属性
        要求属性私有，并提供get和set方法，无参和有参构造方法
        定义展示属性的show()方法
 **/
public class Chinese {
    private String name;
    private int age;
    private String country;

    public Chinese(String name, int age, String country) {
        this.name = name;
        this.age = age;
        this.country = country;
    }

    public Chinese() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }



    public void show(){
        System.out.println("name:"+name+",age:"+age+",country:"+country);
    }


//    public static void main(String[] args) {
//        Chinese chinese = new Chinese("zhangsan",18,"中国");
//        chinese.show();
//    }
}
